<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>while</title>
		<script type="text/javascript">
			var sum=0;
			var i=0;
			while(i<100)
			{
				sum=sum+i;
				i++;				
			}
			document.write("<h1>sum的和"+sum+"</h1>");
		</script>
	</head>
	<body>
	</body>
</html>
